Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Add command to increase project version and implement version increment logic, Closes #94 #387

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

nicodecleyre
Copy link
Contributor

🎯 Aim

This pull request increases the version of the package.json & package-solution.json file with either major, minor or patch

📷 Result

Untitled.video.-.Made.with.Clipchamp.14.mp4

✅ What was done

clarify what was done and what still needs to be finished ex. [Remove this line]

  • added button to increase version
  • created prompt that asks for 'major', 'minor' or 'patch' when clicking on the button
  • increasing the number with function in separate file
  • Change the increased number in package.json
  • Change the increased number in package-solution.json (with an extra '0' at the end for the revision so the format is X.X.X.0)

🔗 Related issue

Closes: #94

@Adam-it Adam-it self-assigned this Jan 3, 2025
Copy link
Member

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicodecleyre awesome work so far. I added some small fixup to your branch. I left also two comments that we could recheck before we merge.

src/utils/increaseVersion.ts Outdated Show resolved Hide resolved
src/panels/CommandPanel.ts Outdated Show resolved Hide resolved
@Adam-it Adam-it marked this pull request as draft January 3, 2025 22:54
@nicodecleyre nicodecleyre force-pushed the increase-version-number branch from ca10eee to 9ca8890 Compare January 19, 2025 18:12
@nicodecleyre nicodecleyre marked this pull request as ready for review January 19, 2025 18:13
Copy link
Member

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I exposed this as a new VS code command so we may also start it using the VS Code commands when using F1 key
and I performed a bit of clean-up
LGTM

src/utils/increaseVersion.ts Show resolved Hide resolved
@Adam-it
Copy link
Member

Adam-it commented Jan 20, 2025

@nicodecleyre I did the review and I have one last thing I noticed I wanted to recheck with you.
When running this command in a SPFx project as port of TeamToolkit project we actually have 3 places with version 🤦‍♂️
We have the

  • package-solution.json which is part of the spfx project inside the nested src folder
  • package.json which is also part of spfx project in the nested src folder
  • package.json which is also part of teams toolkit project

image

From what I checked the package.json form the spfx part does not get updated in this case. I think this might be wrong and I think we should do one of the following:

  • either in this case we update and align all three of those palces
  • or (and I am thinking if this will be better) we only update the version in the package-solution.json and package.json which are part of the SPFx project and we do not change anything on the Teams Toolkit project.

Which option would you pick? What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants